
<div id="app">
  <button @click="onClick">按钮</button>
  <ul>
    <!-- <li v-for="item in arr">{{ item }}</li> -->
    <li v-for="item in arr" :key="item">{{ item }}</li>
  </ul>
</div>

<script src="https://lib.baomitu.com/vue/2.6.11/vue.js"></script>

<script>
  let vm = new Vue({
    el: '#app',
    data: {
      arr: [1, 2, 3]
    },
    methods: {
      onClick () {
        // 不是响应式的
        // this.arr[0] = 0
        // this.arr.splice(0, 1, 0)
        this.arr.reverse()
      }
    }
  })
</script>
